From eea1272807cbc3fcca333b0f6e326095026eb92a Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Wed, 5 Aug 2026 17:14:32 +0000 Subject: [PATCH] Drop the COMMUNITY_MEMBERSHIP_UPDATE_LOG table in favor of COMM_MEMB_LOG --- db/schemas/housekeeping/indexes/Makefile | 1 - .../create/community_membership_update_log.m4 | 36 ------ .../drop/community_membership_update_log.m4 | 27 ----- db/schemas/housekeeping/tables/Makefile | 1 - .../create/community_membership_update_log.m4 | 38 ------ db/schemas/lib/triggers/Makefile | 1 - .../create/community_membership_update_log.m4 | 49 -------- .../drop/community_membership_update_log.m4 | 23 ---- doc/src/epilog.inc.m4 | 22 ---- doc/src/housekeeping.m4 | 1 - .../community_membership_update_log.m4 | 113 ------------------ 11 files changed, 312 deletions(-) delete mode 100644 db/schemas/housekeeping/indexes/create/community_membership_update_log.m4 delete mode 100644 db/schemas/housekeeping/indexes/drop/community_membership_update_log.m4 delete mode 100644 db/schemas/housekeeping/tables/create/community_membership_update_log.m4 delete mode 100644 db/schemas/lib/triggers/create/community_membership_update_log.m4 delete mode 100644 db/schemas/lib/triggers/drop/community_membership_update_log.m4 delete mode 100644 doc/src/housekeeping/community_membership_update_log.m4 diff --git a/db/schemas/housekeeping/indexes/Makefile b/db/schemas/housekeeping/indexes/Makefile index 1159e5c..a486918 100644 --- a/db/schemas/housekeeping/indexes/Makefile +++ b/db/schemas/housekeeping/indexes/Makefile @@ -22,7 +22,6 @@ ORDER := aggression_event_log \ biography_log \ chimps_on_tikis \ - community_membership_update_log \ comm_memb_log \ food_variations \ pantgrunt_event_log \ diff --git a/db/schemas/housekeeping/indexes/create/community_membership_update_log.m4 b/db/schemas/housekeeping/indexes/create/community_membership_update_log.m4 deleted file mode 100644 index 1c7b6db..0000000 --- a/db/schemas/housekeeping/indexes/create/community_membership_update_log.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ -dnl -dnl This program is free software: you can redistribute it and/or modify -dnl it under the terms of the GNU Affero General Public License as published -dnl by the Free Software Foundation, either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU Affero General Public License for more details. -dnl -dnl You should have received a copy of the GNU Affero General Public License -dnl along with this program. If not, see . -dnl -dnl Karl O. Pinc -dnl -dnl -dnl m4 includes -include(`copyright.m4')dnl -include(`constants.m4')dnl -include(`indexmacros.m4')dnl - -CREATE UNIQUE INDEX IF NOT EXISTS - "DateOfUpdate + AnimID must be unique" - ON community_membership_update_log - (dateofupdate, animid); - -CREATE INDEX IF NOT EXISTS community_membership_update_log_animid - ON community_membership_update_log - (animid); -CREATE INDEX IF NOT EXISTS community_membership_update_log_madeby - ON community_membership_update_log - (madeby); - - diff --git a/db/schemas/housekeeping/indexes/drop/community_membership_update_log.m4 b/db/schemas/housekeeping/indexes/drop/community_membership_update_log.m4 deleted file mode 100644 index 0f22008..0000000 --- a/db/schemas/housekeeping/indexes/drop/community_membership_update_log.m4 +++ /dev/null @@ -1,27 +0,0 @@ -dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ -dnl -dnl This program is free software: you can redistribute it and/or modify -dnl it under the terms of the GNU Affero General Public License as published -dnl by the Free Software Foundation, either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU Affero General Public License for more details. -dnl -dnl You should have received a copy of the GNU Affero General Public License -dnl along with this program. If not, see . -dnl -dnl Karl O. Pinc -dnl -dnl -dnl m4 includes -include(`copyright.m4')dnl -include(`constants.m4')dnl -include(`indexmacros.m4')dnl - -DROP INDEX IF EXISTS "DateOfUpdate + AnimID must be unique"; - -DROP INDEX IF EXISTS community_membership_update_log_animid; -DROP INDEX IF EXISTS community_membership_update_log_madeby; diff --git a/db/schemas/housekeeping/tables/Makefile b/db/schemas/housekeeping/tables/Makefile index 801edaf..e318776 100644 --- a/db/schemas/housekeeping/tables/Makefile +++ b/db/schemas/housekeeping/tables/Makefile @@ -24,7 +24,6 @@ ORDER := aggression_event_log \ biography_log \ chimps_on_tikis \ comm_memb_log \ - community_membership_update_log \ food_variations \ pantgrunt_event_log \ siv_status_bout \ diff --git a/db/schemas/housekeeping/tables/create/community_membership_update_log.m4 b/db/schemas/housekeeping/tables/create/community_membership_update_log.m4 deleted file mode 100644 index 196ce67..0000000 --- a/db/schemas/housekeeping/tables/create/community_membership_update_log.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ -dnl -dnl This program is free software: you can redistribute it and/or modify -dnl it under the terms of the GNU Affero General Public License as published -dnl by the Free Software Foundation, either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU Affero General Public License for more details. -dnl -dnl You should have received a copy of the GNU Affero General Public License -dnl along with this program. If not, see . -dnl -dnl Karl O. Pinc -dnl -dnl -dnl m4 includes -include(`copyright.m4')dnl -include(`constants.m4')dnl -include(`tablemacros.m4')dnl -include(`grants.m4')dnl -dnl - -CREATE TABLE community_membership_update_log ( - key_column(`COMMUNITY_MEMBERSHIP_UPDATE_LOG', `ID', INTEGER) - ,dateofupdate DATE NOT NULL - ,animid_column() - ,description TEXT NOT NULL - notonlyspaces_check(`Description') - ,rationale TEXT NOT NULL - notonlyspaces_check(`Rationale') - ,madeby TEXT NOT NULL - REFERENCES people -); - -grant_priv(`COMMUNITY_MEMBERSHIP_UPDATE_LOG') diff --git a/db/schemas/lib/triggers/Makefile b/db/schemas/lib/triggers/Makefile index 7202876..973ee76 100644 --- a/db/schemas/lib/triggers/Makefile +++ b/db/schemas/lib/triggers/Makefile @@ -58,7 +58,6 @@ ORDER := comm_ids \ aggression_event_log \ chimps_on_tikis \ tlk_brecord_notes_codes \ - community_membership_update_log \ food_variations \ pantgrunt_event_log \ subadult_arrivals_log \ diff --git a/db/schemas/lib/triggers/create/community_membership_update_log.m4 b/db/schemas/lib/triggers/create/community_membership_update_log.m4 deleted file mode 100644 index bb53c29..0000000 --- a/db/schemas/lib/triggers/create/community_membership_update_log.m4 +++ /dev/null @@ -1,49 +0,0 @@ -dnl Copyright (C) 2026 The Meme Factory, Inc. http://www.karlpinc.com/ -dnl -dnl This program is free software: you can redistribute it and/or modify it -dnl under the terms of the GNU Affero General Public License as published by -dnl the Free Software Foundation, either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU Affero General Public License for more details. -dnl -dnl You should have received a copy of the GNU Affero General Public License -dnl along with this program. If not, see . -dnl -dnl Triggers for the community_membership_update_log table -dnl -dnl Karl O. Pinc - -dnl m4 includes -include(`copyright.m4')dnl -include(`constants.m4')dnl -include(`macros.m4')dnl - - -RAISE INFO 'community_membership_update_log_update_func'; -CREATE OR REPLACE FUNCTION community_membership_update_log_update_func () - RETURNS trigger - LANGUAGE plpgsql - sdb_function_set_search_path - AS $$ - BEGIN - -- Function for community_membership_update_log update trigger - -- - -- AGPL_notice(` --', `2026', - `The Meme Factory, Inc., www.karlpinc.com') - - cannot_change(`COMMUNITY_MEMBERSHIP_UPDATE_LOG', `ID') - - RETURN NULL; - END; -$$; - - -RAISE INFO 'community_membership_update_log_update_trigger'; -CREATE TRIGGER community_membership_update_log_update_trigger - AFTER UPDATE - ON community_membership_update_log FOR EACH ROW - EXECUTE PROCEDURE community_membership_update_log_update_func(); diff --git a/db/schemas/lib/triggers/drop/community_membership_update_log.m4 b/db/schemas/lib/triggers/drop/community_membership_update_log.m4 deleted file mode 100644 index cad0a0b..0000000 --- a/db/schemas/lib/triggers/drop/community_membership_update_log.m4 +++ /dev/null @@ -1,23 +0,0 @@ -dnl Copyright (C) 2026 The Meme Factory, Inc. http://www.karlpinc.com/ -dnl -dnl This program is free software: you can redistribute it and/or modify -dnl it under the terms of the GNU Affero General Public License as published by -dnl the Free Software Foundation, either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU Affero General Public License for more details. -dnl -dnl You should have received a copy of the GNU Affero General Public License -dnl along with this program. If not, see . -dnl -dnl Drop triggers for community_membership_update_log table -dnl -dnl Karl O. Pinc - -dnl m4 includes -include(`copyright.m4')dnl - -DROP FUNCTION IF EXISTS community_membership_update_log_update_func() CASCADE; diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index 6100bd6..56102af 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -388,28 +388,6 @@ sdb_generated_rst()dnl .. |COMM_MEMBS_SOURCES.Description| replace:: :ref:`Description ` -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG| - replace:: - :ref:`COMMUNITY_MEMBERSHIP_UPDATE_LOG ` -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.ID| - replace:: - :ref:`ID ` -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.DateOfUpdate| - replace:: - :ref:`DateOfUpdate ` -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.AnimID| - replace:: - :ref:`AnimID ` -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.Description| - replace:: - :ref:`Description ` -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.Rationale| - replace:: - :ref:`Rationale ` -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.MadeBy| - replace:: - :ref:`MadeBy ` - .. |CYCLE_STATES| replace:: :ref:`CYCLE_STATES ` .. |CYCLE_STATES.Code| replace:: :ref:`Code ` diff --git a/doc/src/housekeeping.m4 b/doc/src/housekeeping.m4 index 86d9147..b1ee298 100644 --- a/doc/src/housekeeping.m4 +++ b/doc/src/housekeeping.m4 @@ -38,7 +38,6 @@ The tables in this section are all in the ``housekeeping`` schema. housekeeping/chimps_on_tikis.rst housekeeping/comm_memb_log.rst housekeeping/food_variations.rst - housekeeping/community_membership_update_log.rst housekeeping/pantgrunt_event_log.rst housekeeping/siv_status_bout.rst housekeeping/subadult_arrivals_log.rst diff --git a/doc/src/housekeeping/community_membership_update_log.m4 b/doc/src/housekeeping/community_membership_update_log.m4 deleted file mode 100644 index 8347af4..0000000 --- a/doc/src/housekeeping/community_membership_update_log.m4 +++ /dev/null @@ -1,113 +0,0 @@ -.. Copyright (C) 2026 The Meme Factory, Inc. www.karlpinc.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -.. M4 setup -include(constants.m4)dnl -include(macros.m4)dnl -sdb_rst_quotes(`on')dnl -sdb_generated_rst()dnl - -.. _COMMUNITY_MEMBERSHIP_UPDATE_LOG: - -COMMUNITY_MEMBERSHIP_UPDATE_LOG -------------------------------- - -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG_summary| replace:: - Each row contains information on when and why the community - membership of an individual was updated. - There is, at most, one row per-individual, per-date of update. - -|COMMUNITY_MEMBERSHIP_UPDATE_LOG_summary| - -The combination of |COMMUNITY_MEMBERSHIP_UPDATE_LOG.AnimID| and -|COMMUNITY_MEMBERSHIP_UPDATE_LOG.DateOfUpdate| must be unique. - - -.. contents:: - :depth: 2 - - -.. _COMMUNITY_MEMBERSHIP_UPDATE_LOG.ID: - -ID (IDentifier) -``````````````` - -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.ID_summary| replace:: |idcol| - -|COMMUNITY_MEMBERSHIP_UPDATE_LOG.ID_summary| |notnull| - - -.. _COMMUNITY_MEMBERSHIP_UPDATE_LOG.DateOfUpdate: - -DateOfUpdate -```````````` - -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.DateOfUpdate_summary| replace:: - The date of the change in community. - -|COMMUNITY_MEMBERSHIP_UPDATE_LOG.DateOfUpdate_summary| - -|notnull| - - -.. _COMMUNITY_MEMBERSHIP_UPDATE_LOG.AnimID: - -AnimID -`````` - -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.AnimID_summary| replace:: - The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| of the individual - who's community was updated. - -|COMMUNITY_MEMBERSHIP_UPDATE_LOG.AnimID_summary| - -|notnull| - - -.. _COMMUNITY_MEMBERSHIP_UPDATE_LOG.Description: - -Description -``````````` - -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.Description_summary| replace:: - A description of what was changed. - -|COMMUNITY_MEMBERSHIP_UPDATE_LOG.Description_summary| -|notonlyspaces| |notnull| - - -.. _COMMUNITY_MEMBERSHIP_UPDATE_LOG.Rationale: - -Rationale -``````````` - -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.Rationale_summary| replace:: - The rationale for the change. - -|COMMUNITY_MEMBERSHIP_UPDATE_LOG.Rationale_summary| -|notonlyspaces| |notnull| - - -.. _COMMUNITY_MEMBERSHIP_UPDATE_LOG.MadeBy: - -MadeBy -`````` - -.. |COMMUNITY_MEMBERSHIP_UPDATE_LOG.MadeBy_summary| replace:: - The person who made the change. - A |PEOPLE|.\ |PEOPLE.Person| value. - -|COMMUNITY_MEMBERSHIP_UPDATE_LOG.MadeBy_summary| -|notonlyspaces| |notnull| -- 2.34.1